﻿<div class="mainbody">
<div class="navlink"><a href="#">控制面版</a> » 分类管理</div>
</div>


<div class="mainbody">
  <table style="width: 100%;" border="0" cellpadding="0" cellspacing="0">
	<tbody><tr>
	  <td style="width: 150px;" valign="top">



	  
<div class="tableborder">
<div class="tableheader">分类管理</div>
<div class="leftmenubody">
<div class="leftmenuitem">• 
<%=link_to "分类管理",:controller=>'admin/type',:action=>'index'%></div>

<div class="leftmenuitem">•
<%=link_to_remote (
			  "添加分类", 
			  {
			  :update => "cp_main",
			  :url => {:controller=>"admin/type",
			  :action => "new"},
			  :complete => "new Effect.Highlight('cp_main')"
			  },{:class=>"link_item"})
			   %>
</div>

<div class="leftmenuitem">•
<%=link_to_remote (
			  "编辑分类", 
			  {
			  :update => "cp_main",
			  :url => {:controller=>"admin/type",
			  :action => "list"},
			  :complete => "new Effect.Highlight('cp_main')"
			  },{:class=>"link_item"})
			   %>
</div>


</div>
</div> <!--END leftmenubody -->
</div> <!--END tableborder -->

<div class="tableborder">  
<div class="tableheader">二级分类管理</div>
<div class="leftmenubody">

<div class="leftmenuitem">•
<%=link_to_remote (
			  "添加子分类", 
			  {
			  :update => "cp_main",
			  :url => {:controller=>"admin/category",
			  :action => "new"},
			  :complete => "new Effect.Highlight('cp_main')"
			  },{:class=>"link_item"})
			   %>
</div>

<div class="leftmenuitem">•
<%=link_to_remote (
			  "编辑子分类", 
			  {
			  :update => "cp_main",
			  :url => {:controller=>"admin/category",
			  :action => "list"},
			  :complete => "new Effect.Highlight('cp_main')"
			  },{:class=>"link_item"})
			   %>
</div>
</div> <!--END leftmenubody -->
</div> <!--END tableborder -->  


<div class="tableborder">
<div class="tableheader">标签管理</div>
<div class="leftmenubody">
 


<div class="leftmenuitem">•
<%=link_to_remote (
			  "添加标签", 
			  {
			  :update => "cp_main",
			  :url => {:controller=>"admin/tag",
			  :action => "new"},
			  :complete => "new Effect.Highlight('cp_main')"
			  },{:class=>"link_item"})
			   %>
</div>

<div class="leftmenuitem">•
<%=link_to_remote (
			  "编辑标签", 
			  {
			  :update => "cp_main",
			  :url => {:controller=>"admin/tag",
			  :action => "list"},
			  :complete => "new Effect.Highlight('cp_main')"
			  },{:class=>"link_item"})
			   %>
</div>


</div>
</div> <!--END leftmenubody -->
</div> <!--END tableborder -->


<div class="tableborder">
<div class="tableheader">属性管理</div>
<div class="leftmenubody">
<div class="leftmenuitem">• 
<%=link_to "属性管理",:controller=>'admin/tags',:action=>'index'%></div>

<div class="leftmenuitem">•
<%=link_to_remote (
			  "添加属性", 
			  {
			  :update => "cp_main",
			  :url => {:controller=>"admin/type",
			  :action => "new"},
			  :complete => "new Effect.Highlight('cp_main')"
			  },{:class=>"link_item"})
			   %>
</div>

<div class="leftmenuitem">•
<%=link_to_remote (
			  "编辑属性", 
			  {
			  :update => "cp_main",
			  :url => {:controller=>"admin/type",
			  :action => "list"},
			  :complete => "new Effect.Highlight('cp_main')"
			  },{:class=>"link_item"})
			   %>
</div>


</div>
</div> <!--END leftmenubody -->
</div> <!--END tableborder -->
		  
	</div> <!--END mainbody -->  
	 
	 </td>
		
	  <td style="width: 20px;" valign="top"></td>

	  <td valign="top">

	  <div id="cp_main">
		<%= error_messages_for 'user' %>
		<%= form_tag :action => 'update' %>

  <table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">
	  <tbody><tr><td class="rightmainbody"><table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">

    <tbody>
    <tr class="tdbheader">
      <td nowrap="nowrap" width="10%">排序</td>
      <td width="35%">名称</td>
      <td width="35%">文章数</td>
      <td nowrap="nowrap" width="20%">操作</td>
    </tr>

    <%@types.each do |type|%>
    <tr class="tablecell">
      <td nowrap="nowrap">
      <input class="formfield" style="text-align: center; font-size: 11px;" value=<%=type.position.to_i%> name="displayorder[2]" size="1" type="text"></td>
      <td><b><%=type.title%></b></td>
      <td><%=type.topics_count%></td>
      <td nowrap="nowrap">
      <%= link_to '编辑', :action => 'edit', :id => type %>
      - <%= link_to '删除', { :action => 'destroy', :id => type }, :confirm => 'Are you sure?', :method => :post %>
      </a>
      </td>
    </tr>
    <% end %>



    <tr class="tablecell">
      <td colspan="4" align="center">
        <input name="action" value="updatedisplayorder" type="hidden">
        <input value="更新排序" class="formbutton" type="submit">
      </td>
    </tr>

    <tr>

      <td class="tablebottom" colspan="4"></td>
    </tr>
      </tbody></table></td>
    </tr>
  </tbody></table>
</form>

	   </div>
		</td>
	</tr>
  </tbody></table>
</div>















